x86: refine address validity checks before accessing page tables
authorJan Beulich <jbeulich@suse.com>
Mon, 28 Oct 2013 11:00:36 +0000 (12:00 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 28 Oct 2013 11:00:36 +0000 (12:00 +0100)
commit343cad8c70585c4dba8afc75e1ec1b7610605ab2
tree156149643387fa22fce07f9095cbf7c3f4c98cc8
parent1c7964a1ea4b2f46958fdc716c7b9a06f5514fab
x86: refine address validity checks before accessing page tables

In commit 40d66baa ("x86: correct LDT checks") and d06a0d71 ("x86: add
address validity check to guest_map_l1e()") I didn't really pay
attention to the fact that these checks would better be done before the
paging_mode_translate() ones, as there's also no equivalent check down
the shadow code paths involved here (at least not up to the first use
of the address), and such generic checks shouldn't really be done by
particular backend functions anyway.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/include/asm-x86/paging.h